// commons/diy/shop-hearder/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    search: {
      type: String,
      value: '输入商家、商品名称',
    },
    all_color: {
      type: String,
      value: '#ffffff',
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    logo: '',
    name: '',
    store: '',
    __wxapp_img: ''
  },

  ready: function (){
    this.get_data();
  },

  /**
   * 组件的方法列表
   */
  methods: {
    
    get_data: function () {
      var shop_info = wx.getStorageSync('address_info');
      var store = wx.getStorageSync('store');
      var that = this;
      if (!store) {
        setTimeout(function () {
          that.get_data();
        },1000)
      }else {
        this.setData({
          logo: shop_info.logo,
          name: shop_info.name,
          store: store,
          __wxapp_img: wx.getStorageSync('wxapp_img')
        })
      }
      
    }
  }
})
